// 循环判断是否含有权限

/**
 * 
 * @param {*} toPage 跳转页面Name路径标识
 * @param {} route 权限路由
 * @returns 
 */
const getPermission = (toPage,route) =>{
   
    let flag = false
    flag = route.some(item => {
      return (item.name == toPage || (item.children.length>0 ? getPermission(toPage,item.children):false))
    })
    return flag
}


  export default getPermission